<?xml version="1.0" encoding="UTF-8" ?>
 
<xsl:stylesheet version="1.0" 
        xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
        xmlns="http://www.w3.org/1999/xhtml">
    <xsl:output method="xml" indent="no"
        doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" 
        doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"/>

<xsl:template name="dateSelectorDojo">
</xsl:template>


<xsl:template name="dateSelector">
    <xsl:choose>
        <xsl:when test="(/root/dojo) = 1">
            <script type="text/javascript">
                dojo.require("dijit.form.DateTextBox");
            </script>
            <div class="dateSelector">
                <form method="get" action="report.php">
                    <input type="hidden" name="module" value="{/root/module}"/>
                    <input type="hidden" name="report" value="{/root/report}"/> с
                    <input name="date1" value="{/root/date1}" size="10" data-dojo-type='dijit.form.DateTextBox'/> по
                    <input name="date2" value="{/root/date2}" size="10" data-dojo-type='dijit.form.DateTextBox'/>
                    <input type="submit" value="Показать"/>
                </form>
            </div>
        </xsl:when>
        <xsl:otherwise>
            <div class="dateSelector">
                <form method="get" action="report.php">
                    <input type="hidden" name="module" value="{/root/module}"/>
                    <input type="hidden" name="report" value="{/root/report}"/> с
                    <input name="date1" value="{/root/date1Human}" size="10"/> по
                    <input name="date2" value="{/root/date2Human}" size="10"/>
                    <input type="submit" value="Показать"/>
                </form>
            </div>
        </xsl:otherwise>
    </xsl:choose>
</xsl:template>
 
</xsl:stylesheet>